package com.siyuan.blog.common;


import javax.sql.DataSource;
import java.util.Properties;

/**
 * 创建人：田轩
 * 创建时间：2017/11/8
 * 描述：
 */
public class DruidDataSourceFactory {

    public static DataSource createDataSource() {
        Properties druidConfig = new PropertiesHandler("druid").getProperties();
        DataSource dataSource = null;
        try {
            dataSource = com.alibaba.druid.pool.DruidDataSourceFactory.createDataSource(druidConfig);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return dataSource;
    }
}
